<?php
/* @var $this ShiftChangeController */
/* @var $model ShiftChange */

$this->breadcrumbs=array(
	'Q-Shifts'=>array('/qshift/'),
	'Swap Management'=>array('/shiftChange/swap_management/'),
	'Viewing',
	$model->idshift_change,
);

if ($model->isStatusCancellable($model->day_requested)){

	$this->menu=array(
		array('label'=>'Cancel Swap', 'url'=>'#', 'linkOptions'=>array('submit'=>array('cancelSwap','id'=>$model->idshift_change),'confirm'=>'Are you sure you want to cancel this Swap?')),
		array('label'=>'Back to Swap Management', 'url'=>array('swap_management')),
	);
} else {
	$this->menu=array(
		array('label'=>'Back to Swap Management', 'url'=>array('swap_management')),
	);
}

?>

<h1>Viewing Swap with <?php echo $model->getTargetUserFullName(); ?> for <?php echo $model->day_requested; ?></h1>
<br>
<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		//'idshift_change',
		array(
			'name'=>'Requestor',
			'value'=>$model->requestingUser_relation->fullname),		
		array(
			'name'=>'Requested Q-Shift',
			'value'=>$model->requestedQshift_relation->name),				
		'day_requested',
		array(
			'name'=>'Status',
			'value'=>$model->getStatus($model->request_status)),	
		array(
			'name'=>'Target User',
			'value'=>$model->getTargetUserFullName()),	
		'comments',
	),
)); ?>
